function [Model, CurrentTrueList] = Ddavid_add_points_by_svdd(Data, TrueLabel, SampledTrueLabel, Arg)

% [Model, CurrentTrueList] = Ddavid_add_points_by_svdd(Data, TrueLabel, SampledTrueLabel, Arg)
%
% <Input>
% Data: [n*m], n is the number of data instances, m is the number of
%                 features
% TrueLabel: [n*1], the value is {-1, 1}, the real answer of this label
% SampledTrueLabel: [n*1], {0, 1}, 1 means the points is considered as this label
% Arg: double
%
% <Output>
% Model
% CurrentTrueList: [n*1], {0, 1}, 1 means the instance is inside the SVDD

disp(['Ddavid_add_points_by_svdd Arg = ' num2str(Arg)]);

C = 1;
SampledTrueLabelSize = sum(SampledTrueLabel == 1);

% SVDD
[Model, AllDist] = Ddavid_svdd(Data, SampledTrueLabel, Arg, C);
    
% Add points to CurrentTrueList by relaxed SVDD
CurrentTrueList = (AllDist <= Model.r);
CurrentTrueListSize = sum(AllDist <= Model.r);

AddedPointNumber = sum((CurrentTrueList == 1) & (SampledTrueLabel == 0));
CorrectPointNumber = sum((CurrentTrueList == 1) & (SampledTrueLabel == 0) & (TrueLabel == 1));

disp(['CurrentTrueList Size = ' num2str(SampledTrueLabelSize) ' -> ' num2str(CurrentTrueListSize) ', ' num2str(CorrectPointNumber) '/' num2str(AddedPointNumber) ' = ' num2str(CorrectPointNumber / AddedPointNumber * 100) '%']);
